The technology described herein relates to a method of and apparatus for allocating memory to processing cores in a multi-core, e.g. computer graphics, processing system.
As is known in the art, graphics processing is normally carried out by first dividing the output to be generated, such as a frame to be displayed, into a number of similar basic components (so called “primitives”) to allow the graphics processing operations to be more easily carried out. These “primitives” are usually in the form of simple polygons, such as triangles.
The graphics primitives are usually generated by the applications program interface for the graphics processing system, using the graphics drawing instructions (requests) received from the application (e.g. game) that requires the graphics output.
Each primitive is at this stage usually defined by and represented as a set of vertices. Each vertex for a primitive has associated with it a set of data (such as position, colour, texture, and other attributes data) representing the vertex. This data is then used, e.g., when rasterising and rendering the vertex (the primitive(s) to which the vertex relates) in order to generate the desired output of the graphics processing system.
Once primitives and their vertices have been generated and defined, they can be processed by the graphics processing system, in order, e.g., to display the frame.
This process basically involves determining which sampling points of an array of sampling points covering the output area to be processed are covered by a primitive, and then determining the appearance each sampling point should have (e.g. in terms of its colour, etc.) to represent the primitive at that sampling point. These processes are commonly referred to as rasterising and rendering, respectively.
(In graphics literature, the term “rasterisation” is sometimes used to mean both primitive conversion to sample positions and rendering. However, herein “rasterisation” will be used to refer to converting primitive data to sampling point addresses only.)
The rasterising process determines the sample positions that should be used for a primitive (i.e. the (x, y) positions of the sampling points to be used to represent the primitive in the output, e.g. scene to be displayed). This is typically done using the positions of the vertices of a primitive.
The rendering process then derives the data, such as red, green and blue (RGB) colour values and an “Alpha” (transparency) value, necessary to represent the primitive at the sampling points (i.e. “shades” each sampling point). This can involve, as is known in the art, applying textures, blending sampling point data values, applying depth tests etc. In some arrangements, the data which is derived as a result of the rendering process may be compressed and then output to main memory.
As is known in the art, in a multi-core graphics processing system, the time taken to carry out a graphics processing job (e.g. rendering, data compression, etc.) can be greatly reduced by dividing the scene to be processed into a number of task, and then allocating different ones of those tasks to different graphics processing cores for processing in parallel. Each task may, e.g., be a respective tile to be processing in a tile-based graphics processing system.
The different results produced by the different graphics processing tasks are typically stored in the same buffer as they are being produced, e.g. prior to being output together, and so a portion of a buffer is required for use by each of the graphics processing cores for storing the results produced as and when the results are produced by the cores.
In cases where the amount of buffered memory required by each graphics processing core to complete a given task is known in advance, it is relatively simple to allocate an amount of the buffer for use by each graphics processing core prior to the graphics processing task being carried out. For example, where there are four graphics processing cores, and it is known that each of the graphics processing cores will require the same amount of the buffer to stored its results, each core can be allocated a quarter of the buffer.
However, for some graphics processing tasks, the processing time for a task and/or the amount of memory required to store the result for a task can vary from task to task. This can lead to some graphics processing cores requiring less of the buffer to store their results than others (e.g. either because the results produced by that core require less storage space and/or because that core has processed fewer tasks). Generally, the data stored in the buffer should be stored as close together as possible, e.g. for efficient paging. Thus, for some graphics processing tasks, simply allocating each core a fraction of the buffer can lead to undesirable gaps in the data which is stored in the buffer.
The Applicants believe that there remains scope for improved arrangements for allocating memory to processing cores in a multi-core, e.g. computer graphics, processing system.
Like reference numerals are used for like components where appropriate in the drawings.